<p style="height: 5px;"></p>
			<div id="top" class="easyui-panel" title="测算信息" data-options="cls:'theme-panel-orange'" style="width:100%;height:275px;padding:10px;">
				<table border="0">
					
					
					<tr>
						<td align="right" >姓名</td>
						<td>
							<input id="tem_name" name="temporary.name" class="easyui-textbox inputBox theme-textbox-radius" value="${temporary.name !}">
						</td>
						<td align="right"  >性别</td>
						<td>
							<select id="tem_sex" name="temporary.sex" class="easyui-combobox inputBox theme-textbox-radius" panelHeight="auto" data-options="editable: false">
									<% if(temporary.sex! == '男'){ %>
										<option value="男" selected="selected">男</option>
									<% } %>
									 <% if(temporary.sex! == '女'){ %>
										<option value="女" selected="selected">女</option>
									<% } %>
									<% else{ %>
										<option value="女">女</option>
										<option value="男">男</option>
									<% } %>
							</select>
						</td>
						<td align="right" class="word">手机</td>
						<td>
							<input id="tem_phone" name="temporary.phone" class="easyui-numberbox inputBox theme-textbox-radius"  value="${temporary.phone !}">
						</td>
						<td>
							<a  class="easyui-linkbutton" data-options="iconCls:'icon-search'" onclick="searchInfo()">查询</a>
						</td>
					</tr>
					<tr>
						<td align="right">年龄</td>
						<td>
							<input id="tem_age" name="temporary.age" class="easyui-numberspinner inputBox theme-textbox-radius" value="${temporary.age !}" data-options="increment:1,min:1,max:100,label:'岁'" labelPosition="after"></input>
						</td>
						<td align="right">身高</td>
						<td style="width: 125px;">
							<input id="tem_height" name="temporary.height" class="easyui-numberspinner inputBox theme-textbox-radius" value="${temporary.height !}" data-options="increment:1,min:100,max:251,label:'cm'" labelPosition="after"></input>
						</td>
						<td align="right">体重</td>
						<td>
							<input id="tem_weight" name="temporary.weight" class="easyui-numberspinner inputBox theme-textbox-radius" value="${temporary.weight !}" data-options="increment:0.1,min:1,label:'斤',precision:1" labelPosition="after"></input>
						</td>
						<td>
							<a  class="easyui-linkbutton" data-options="iconCls:'icon-mesure'" onclick="mesure()">测算</a>
						</td>
					</tr>
					<!-- <tr>
						<td align="right">测算结果</td>
						<td colspan="5">
							<input id="result" name="temporary.result" readonly="readonly" class="mesureContent" value="${temporary.result !}">
						</td>
					</tr> -->
					<tr>
						<td align="right">标准体重</td>
						<td>
							<input id="stantardWeight" name="customerAgreement.std_weight"  class="easyui-textbox inputBox theme-textbox-radius" readonly="readonly"  data-options="label:'斤'" labelPosition="after" value="${temporaryAgreement.std_weight !}"> 
						</td>
						<td align="right">应减斤数</td>
						<td style="width: 125px;">
							<input id="loseWeight" name = "delWeight" class="easyui-textbox inputBox theme-textbox-radius" readonly="readonly"  data-options="label:'斤'" labelPosition="after" value="${temporaryDetail.delweight !}">
						</td>
						<td align="right">目标体重</td>
						<td style="width: 125px;">
							<input id="goalWeight" name="targetWeight" class="easyui-textbox inputBox theme-textbox-radius"   data-options="label:'斤'" labelPosition="after" value="${temporaryDetail.delweight !}" >
						</td>
						
					</tr>
					<tr>
					<tr>
						
						<!--  <td align="right" width="150px">购买疗程</td>
						<td>	
							<input id="treatment_combobox" name="customerAgreement.codeIds"    class="easyui-combobox inputBox theme-textbox-radius"  style="width:120px" panelHeight="auto" data-options="editable: false"/>
							<input id="lc_Ids" type="hidden" value="${temporaryAgreement.codeIds !}" />
						</td>  -->
						<td align="right">减重周期</td>
						<td>
							<input id="target_input"  name="customerAgreement.target"  class="easyui-numberspinner inputBox theme-textbox-radius"  data-options="increment:1,min:0,max:24,label:'月'" labelPosition="after" >
						</td>
						<td align="right">疗程</td>
						<td>
							<input id="lcNumber" name="customerAgreement.treatment"  class="easyui-textbox inputBox theme-textbox-radius" readonly="readonly"  value="${temporaryAgreement.treatment !}">
<!-- 							<input id="countCount" name="customerAgreement.treatment"  class="easyui-textbox inputBox theme-textbox-radius" readonly="readonly" > -->
						</td>
						<td align="right">金额</td>
						<td>
							<input id="amount"  name="customerAgreement.cost"  class="easyui-textbox inputBox theme-textbox-radius" readonly="readonly"  data-options="label:'元'" labelPosition="after" >
						</td>
					</tr>
					<tr>
						<td align="right" >电话回访</td>
						<td>
							<input id="callvisitcount"  readonly="readonly" name="callvisitcount"   class="easyui-textbox inputBox theme-textbox-radius" readonly="true" value="${temporary.name !}">
						</td>
						<td align="right" >到店访问</td>
						<td>
							<input id="toshopvisitcount" readonly="readonly"  name="toshopvisitcount" class="easyui-textbox inputBox theme-textbox-radius" readonly="true" value="${temporary.name !}">
						</td>
					</tr>
				</table>
			</div>
			
			<p style="height: 5px;"></p>
			<div id="bottom" class="easyui-panel" title="接待登记" style="width:100%;height:auto;padding:10px;" data-options="cls:'theme-panel-orange'">
				<table border="0">
					<tr>
						<td align="right">接待人</td>
						<td>
								<#organization type="select" id="jdr_select" name="temporary.jdr"  defaultCode="${userids !}" class="easyui-combobox inputBox theme-textbox-radius" organization="${organids! }"/>
<!-- 								<input id="jdr_input" type="hidden" value="${temporary.jdr !}"> -->
<!-- 								<input id="jdr_combobox" name="temporary.jdr" class="easyui-combobox inputBox theme-textbox-radius" /> -->
						</td>
						<td align="right">顾客反映</td>
						<td>
								<#code type="select" id="gkfy_select" name="temporary.gkfy" code="code_gkfy" defaultCode="${temporary.gkfy! }"  class="easyui-combobox inputBox theme-textbox-radius" />
						</td>
						<td align="right">进店方式</td>
						<td>
								<#code type="select" id="jdfs_select" name="temporary.jdfs" code="code_jdfs" defaultCode="${temporary.jdfs! }"  class="easyui-combobox inputBox theme-textbox-radius" />
<!-- 								<input id="jdfs_input" type="hidden" value="${temporary.jdfs !}"> -->
<!-- 							<input id="inShop" name="temporary.jdfs" class="easyui-combobox inputBox theme-textbox-radius"  style="width:100%"/> -->
						</td>
						<td style="width: 142px;"></td>
					</tr>				
					<tr id="introduce" class="introduce" style="display: none;">
						<td align="right">介绍人姓名</td>
						<td>
							<input id="jsrIds" type="hidden" name="temporary.jsrIds"  >
							<input id="jsrName"   class="easyui-textbox inputBox theme-textbox-radius" value="${temporary.name !}">
						</td>
						<td align="right" >介绍人手机号</td>
						<td>
						
							<input id="jsrPhone"    class="easyui-textbox inputBox theme-textbox-radius" value="${temporary.phone !}">
						</td>
						<td align="right">介绍人门店</td>
						<td>	
								<input id="jsrStoreName" class="easyui-textbox inputBox theme-textbox-radius"  value="${temporary.organization.name !}">
<!-- 								<input id="jsrStore_input"  value="${temporary.jsrStore !}"> -->
<!-- 								<input id="jsrStore_combobox" name="temporary.jsrStore"  class="easyui-combobox inputBox theme-textbox-radius"  style="width:100%" /> -->
						</td>
						<td></td>
					</tr>
					<tr>
						<td align="right">顾客分类</td>
						<td>
							<#code type="select" id="gkfl_select" name="temporary.gkfl" code="code_gkfl" defaultCode="${temporary.gkfl! }"  class="easyui-combobox inputBox theme-textbox-radius" style="width:121px"/>
<!-- 							<input id="gkfl_input" type="hidden" value="${temporary.gkfl !}"> -->
<!-- 							<input id="gkfl_sel" name="temporary.gkfl" class="easyui-combobox inputBox theme-textbox-radius" /> -->
						</td>
						<td align="right"  id="fzr_td">负责人</td>
						<td id="fzr_select">
							<#organization type="select" id="cp_select" name="chargePersion" organization="${organids! }" defaultCode="${chargePersion !}"   class="easyui-combobox inputBox theme-textbox-radius" />
						</td>
						<td align="right"  id="jrcs_td" ></td>
						<td id="jrcs_td_select">
							
						</td>
						<td align="right"  id="wcjyy_td" >未成交原因</td>
						<td id="wcjyy_td_select">
							<#code type="select" id="wcjyy_select" name="temporary.loseReason" code="code_wcjyy" defaultCode="${temporary.loseReason! }"  class="easyui-combobox inputBox theme-textbox-radius" style="width:121px"/>
						<!-- <input id="other" name="temporary.loseReason" class="easyui-textbox inputBox theme-textbox-radius"> -->
						</td>
						
						
					</tr>
					<tr>
					<td align="right" >谈话内容</td>
					<td colspan="6">
						<input id="talk" name="temporary.talk" class="easyui-textbox inputBox theme-textbox-radius"  style="width:400px"> 
						</td>
					</tr>
				</table>
			</div>
<!-- 				<input type="hidden" id="Buttype" name="buttype"/>  -->
				<input type="hidden" id="Buttype" name="buttype"/> 
<!-- 				<input type="hidden" id="status" name="status"/>  -->
<!-- 				<button  class="easyui-linkbutton btn btn-success" ><span class="glyphicon glyphicon-pencil" aria-hidden="true" style="margin-left: 50%;margin-top: 20px;"></span>上一条</button> -->
<!-- 				<button  class="easyui-linkbutton btn btn-success" ><span class="glyphicon glyphicon-pencil" aria-hidden="true" style="margin-left: 50%;margin-top: 20px;"></span>下一条</button> -->
<!-- 				<button onclick="save()" class="easyui-linkbutton btn btn-success" data-options="iconCls:'icon-save'" style="margin-left:50%;margin-top: 20px;"><span class="glyphicon glyphicon-pencil" aria-hidden="true"></span>&nbsp;保&nbsp;&nbsp;&nbsp;&nbsp;存</button> -->
				<a  class="easyui-linkbutton" data-options="iconCls:'icon-save'" onclick="save()" style="margin-left: 50%;margin-top: 20px;">保存</a>
				
			<div>
<!-- 				<input value='${count !}' />  -->
				<input value="${count! }" /> 
			</div>
			<div data-options="region:'center'" style="width:110">
				顾客到店回访信息：
			</div>
			<div data-options="region:'center'" style="width:110">
				<table id="todaymeasuretable" style="width: '100%'; height: '100%';"></table> 
			</div>
			<div data-options="region:'center'" style="width:110">
				顾客电话回访信息 ：
			</div>
			<div data-options="region:'center'" style="width:110">
				<table id="todaymeasuretablefromcall" style="width: '100%'; height: '100%';"></table> 
			</div>
				
	<script  type="text/javascript" charset="utf-8">
	
// 		function btn1(phone){
// 			loadDialog($('#datagrid'),null, '回访', 'scallVisit/showscallVisit?phone='+phone);
// 		};
		
// 		function btn2(phone){
// 			loadDialog($('#datagrid'),null, '查询', 'scallVisit/queryByCallVisit?phone='+phone);
// 		};
	
	
		function todayMeasure(){
			var todaydate = $("#tem_jdrq").val();
// 			parent.nodeClick("当日测算查询",'/todaymeasurementquery?todaydate='+todaydate);
			loadDialog($('#datagrid'),null, '今日测算', 'measurement/todaymeasureindex?todaydate='+todaydate);
		};
		
		function  searchInfo(){
			var phone=$("#tem_phone").val();
			if(phone==null||phone==''){
				$.alert(parent.$, "手机号码不可为空！");
				return false;
			}
			var url='/measurement/phoneSearch';
			var data={"phone":phone};
			var reData = common_ajax.ajaxFunc(url,data,"json");
			if(reData.msg==200){
				//$("#customerIds").val(reData.ids);
				$("#callvisitcount").textbox('setValue',reData.callvisitcount);
				$("#toshopvisitcount").textbox('setValue',reData.toshopvisitcount);
				$("#tem_name").textbox('setValue',reData.name);
				$("#tem_sex").textbox('setValue',reData.sex);
				$("#tem_phone").textbox('setValue',reData.phone);
				$("#tem_age").textbox('setValue',reData.age);
				$("#tem_height").textbox('setValue',reData.height);
				$("#tem_weight").textbox('setValue',reData.weight);
				$("#loseWeight").textbox('setValue',reData.delWeight);
				$("#lcNumber").textbox('setValue',reData.treatment);
				$("#goalWeight").textbox('setValue',reData.targetWeight);
				$("#amount").textbox('setValue',reData.cost);
				$("#target_input").textbox('setValue',reData.weightDay);
				$("#stantardWeight").textbox('setValue',reData.standWeight);
				$("#jdr_select").combobox('setValue',reData.jdr);
				$("#gkfy_select").combobox('setValue',reData.gkfy);
				$("#jdfs_select").combobox('setValue',reData.jdfs);
				$("#wcjyy_select").combobox('setValue',reData.loseReason);
				
				$("#jsrName").textbox('setValue',reData.jsrName);
				$("#jsrPhone").textbox('setValue',reData.jsrPhone);
				$("#jsrStoreName").textbox('setValue',reData.jsrStore);
				$("#gkfl_select").combobox('setValue',reData.gkfl);
				$("#cp_select").combobox('setValue',reData.gkfl); 
			}else{
				 //$('#zxcsform').form('clear');
				//$("#tem_phone").textbox('setValue',phone);
				$.alert(parent.$, reData.msg);
				// parent.window.nodeClick("咨询测算", "/measurement");
			}
			
			
			
			
			
			
			
			
			
			
			
			$('#todaymeasuretablefromcall').datagrid({
				queryParams: {
					'phone': phone,
				},
				singleSelect: true,
				//rownumbers: true, //显示序号
				pagination: true,
				fitColumns:true,
				pageSize: 10,
				url:'measurement/querypeoplefromcall',
				collapsible: true,
				columns:[[
// 			  		{field:'phone',title:'手机号',width:100,align:'center'},
			  		{field:'visitdate',title:'日期',width:91,align:'center'},
			  		{field:'jdr',title:'接待人',width:91,align:'center'},
			  		{field:'advice',title:'谈话内容',width:91,align:'center'},
			  		{field:'losereason',title:'未成交原因',width:91,align:'center'},
// 			  		{field:'xx',title:'操作',width:91,align:'center',
// 						formatter:function(value,row,index){
// 							return '<a onclick='+'btn1(\'' + row.phone + '\')'+' class='+'button-edit button-success  l-btn l-btn-small'+'><span class='+'l-btn-left'+'><span  style='+'color:red'+' class='+'l-btn-text'+'>回访</span></span></a>'
// 							+'<a onclick='+'btn2(\'' + row.phone + '\')'+' class='+'button-edit button-success  l-btn l-btn-small'+'><span class='+'l-btn-left'+'><span  style='+'color:green'+' class='+'l-btn-text'+'>查询</span></span></a>';
// 					}},
					]]
			});
			
			$('#todaymeasuretable').datagrid({
				queryParams: {
					'phone': phone,
				},
				singleSelect: true,
				//rownumbers: true, //显示序号
				pagination: true,
				
				pageSize: 10,
				url:'measurement/querypeople',
				collapsible: true,
				columns:[[
// 			  		{field:'phone',title:'手机号',width:100,align:'center'},
			  		{field:'visitdate',title:'日期',width:91,align:'center'},
			  		{field:'jdr',title:'接待人',width:91,align:'center'},
			  		{field:'advice',title:'谈话内容',width:91,align:'center'},
			  		{field:'losereason',title:'未成交原因',width:91,align:'center'},
// 			  		{field:'xx',title:'操作',width:91,align:'center',
// 						formatter:function(value,row,index){
// 							return '<a onclick='+'btn1(\'' + row.phone + '\')'+' class='+'button-edit button-success  l-btn l-btn-small'+'><span class='+'l-btn-left'+'><span  style='+'color:red'+' class='+'l-btn-text'+'>回访</span></span></a>'
// 							+'<a onclick='+'btn2(\'' + row.phone + '\')'+' class='+'button-edit button-success  l-btn l-btn-small'+'><span class='+'l-btn-left'+'><span  style='+'color:green'+' class='+'l-btn-text'+'>查询</span></span></a>';
// 					}},
					]]
			});	
			//mesure();
			return  reData; 
		}
		</script>		